***********************************************************************************************
																							  *
* Restitution or Retribution? Detainee Payments and Insurgent Violence 					 	  *
																							  *
* Christopher W. Blair									  									  *
* cwblair@sas.upenn.edu																	      *
* November 2021																			      *
																							  *
***********************************************************************************************

clear all
set more off
set scheme plotplainblind
macro drop _all
estimates drop _all
set matsize 800
set seed 8675309

cd "~/Dropbox/Projects/Detainee Operations/Data/"

use "~/Dropbox/Projects/Detainee Operations/Data/new_detain.dta", clear
estimates drop _all

xtset distid moyr

global dv "pc_instot_sigact pc_df_sigact pc_idf_sigact pc_suicide_sigact pc_ied_sigact pc_ibc_insurgent pc_ibc_sectarian pc_ibc_unknown pc_wits_insurgent"

global sumstat "pc_ibc_coalition pc_wits_insurgent batt_silverman pc_spent_cerp_large_nondetain pc_spent_cerp_small_nondetain pc_spent_usaid pc_spent_condolence pc_spent_police pc_spent_justice pc_spent_prison pc_spent_modmoi pcturban urate popdens soi pic usprt cmoc tif adha hajj ashura ramadan"

global binary "soi tif usprt cmoc"
global continuous "l.pc_wits_insurgent l.pc_ibc_coalition batt_sw l.pc_spent_cap l.pc_spent_cerp_small_nondetain pcturban urate"

*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************


************************************** DETAINEES AND PRISON SPENDING OVER TIME *********************************************************

preserve 

gen spent_prison=pc_spent_prison*pop1000

collapse (sum) spent_prison (max) totaldetainees year, by(moyr)

sort moyr

tw (bar spent_prison moyr if inrange(moyr,528,587), bcolor(gs10%75) blcolor(gs11) yaxis(1)) || (line totaldetainees moyr if inrange(moyr,528,587), lcolor(black) lpattern(1 1 1) yaxis(2)), xlabel(528(3)587, angle(h) tlength(*1.45)) xmtick(528(1)587) legend(off) xline(564, lcolor(cranberry))

restore


************************************************** SPENDING FIGURES *********************************************************************

preserve

drop if year<=2005 | year==2009

tw bar pc_spent_detain moyr if district=="Al-Mahawil", ytitle("Detainee Release Spending/1000 Pop.") ymtick(0(25)200) xlabel(552 "Jan. 2006" 556 "May 2006" 560 "Sept. 2006" 564 "Jan. 2007" 568 "May 2007" 572 "Sept. 2007" 576 "Jan. 2008" 580 "May 2008" 584 "Sept. 2008", labsize(vsmall) angle(45)) xmtick(552(1)587) xtitle("Year-Specific Month") title("Al-Mahawil") saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/mahawil.gph", replace)
tw bar pc_spent_detain moyr if district=="Karkh", ytitle("Detainee Release Spending/1000 Pop.") xlabel(552 "Jan. 2006" 556 "May 2006" 560 "Sept. 2006" 564 "Jan. 2007" 568 "May 2007" 572 "Sept. 2007" 576 "Jan. 2008" 580 "May 2008" 584 "Sept. 2008", labsize(vsmall) angle(45)) xmtick(552(1)587) xtitle("Year-Specific Month") title("Karkh") saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/karkh.gph", replace)

tw bar pc_spent_detain moyr if district=="Basrah", ytitle("Detainee Release Spending/1000 Pop.") xlabel(552 "Jan. 2006" 556 "May 2006" 560 "Sept. 2006" 564 "Jan. 2007" 568 "May 2007" 572 "Sept. 2007" 576 "Jan. 2008" 580 "May 2008" 584 "Sept. 2008", labsize(vsmall) angle(45)) xmtick(552(1)587) xtitle("Year-Specific Month") title("Basrah") saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/basrah.gph", replace)
tw bar pc_spent_detain moyr if district=="Abu Ghraib", ytitle("Detainee Release Spending/1000 Pop.") xlabel(552 "Jan. 2006" 556 "May 2006" 560 "Sept. 2006" 564 "Jan. 2007" 568 "May 2007" 572 "Sept. 2007" 576 "Jan. 2008" 580 "May 2008" 584 "Sept. 2008", labsize(vsmall) angle(45)) xmtick(552(1)587) xtitle("Year-Specific Month") title("Abu Ghraib") saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/abughraib.gph", replace)
tw bar pc_spent_detain moyr if district=="Al Resafa", ytitle("Detainee Release Spending/1000 Pop.") xlabel(552 "Jan. 2006" 556 "May 2006" 560 "Sept. 2006" 564 "Jan. 2007" 568 "May 2007" 572 "Sept. 2007" 576 "Jan. 2008" 580 "May 2008" 584 "Sept. 2008", labsize(vsmall) angle(45)) xmtick(552(1)587) xtitle("Year-Specific Month") title("Al Resafa") saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/alresafa.gph", replace)
tw bar pc_spent_detain moyr if district=="Al Sadr", ytitle("Detainee Release Spending/1000 Pop.") xlabel(552 "Jan. 2006" 556 "May 2006" 560 "Sept. 2006" 564 "Jan. 2007" 568 "May 2007" 572 "Sept. 2007" 576 "Jan. 2008" 580 "May 2008" 584 "Sept. 2008", labsize(vsmall) angle(45)) xmtick(552(1)587) xtitle("Year-Specific Month") title("Al Sadr") saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/alsadr.gph", replace)
tw bar pc_spent_detain moyr if district=="Al-Musayab", ytitle("Detainee Release Spending/1000 Pop.") xlabel(552 "Jan. 2006" 556 "May 2006" 560 "Sept. 2006" 564 "Jan. 2007" 568 "May 2007" 572 "Sept. 2007" 576 "Jan. 2008" 580 "May 2008" 584 "Sept. 2008", labsize(vsmall) angle(45)) xmtick(552(1)587) xtitle("Year-Specific Month") title("Al-Musayab") saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/almusayab.gph", replace)
tw bar pc_spent_detain moyr if district=="Heet", ytitle("Detainee Release Spending/1000 Pop.") xlabel(552 "Jan. 2006" 556 "May 2006" 560 "Sept. 2006" 564 "Jan. 2007" 568 "May 2007" 572 "Sept. 2007" 576 "Jan. 2008" 580 "May 2008" 584 "Sept. 2008", labsize(vsmall) angle(45)) xmtick(552(1)587) xtitle("Year-Specific Month") title("Heet") saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/heet.gph", replace)
tw bar pc_spent_detain moyr if district=="Hilla", ytitle("Detainee Release Spending/1000 Pop.") xlabel(552 "Jan. 2006" 556 "May 2006" 560 "Sept. 2006" 564 "Jan. 2007" 568 "May 2007" 572 "Sept. 2007" 576 "Jan. 2008" 580 "May 2008" 584 "Sept. 2008", labsize(vsmall) angle(45)) xmtick(552(1)587) xtitle("Year-Specific Month") title("Hilla") saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/hilla.gph", replace)
tw bar pc_spent_detain moyr if district=="Mahmoudiya", ytitle("Detainee Release Spending/1000 Pop.") xlabel(552 "Jan. 2006" 556 "May 2006" 560 "Sept. 2006" 564 "Jan. 2007" 568 "May 2007" 572 "Sept. 2007" 576 "Jan. 2008" 580 "May 2008" 584 "Sept. 2008", labsize(vsmall) angle(45)) xmtick(552(1)587) xtitle("Year-Specific Month") title("Mahmoudiya") saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/mahmoudiya.gph", replace)
tw bar pc_spent_detain moyr if district=="Mosul", ytitle("Detainee Release Spending/1000 Pop.") xlabel(552 "Jan. 2006" 556 "May 2006" 560 "Sept. 2006" 564 "Jan. 2007" 568 "May 2007" 572 "Sept. 2007" 576 "Jan. 2008" 580 "May 2008" 584 "Sept. 2008", labsize(vsmall) angle(45)) xmtick(552(1)587) xtitle("Year-Specific Month") title("Mosul") saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/mosul.gph", replace)
tw bar pc_spent_detain moyr if district=="Nassriya", ytitle("Detainee Release Spending/1000 Pop.") xlabel(552 "Jan. 2006" 556 "May 2006" 560 "Sept. 2006" 564 "Jan. 2007" 568 "May 2007" 572 "Sept. 2007" 576 "Jan. 2008" 580 "May 2008" 584 "Sept. 2008", labsize(vsmall) angle(45)) xmtick(552(1)587) xtitle("Year-Specific Month") title("Nassriya") saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/nassriya.gph", replace)
tw bar pc_spent_detain moyr if district=="Ramadi", ytitle("Detainee Release Spending/1000 Pop.") xlabel(552 "Jan. 2006" 556 "May 2006" 560 "Sept. 2006" 564 "Jan. 2007" 568 "May 2007" 572 "Sept. 2007" 576 "Jan. 2008" 580 "May 2008" 584 "Sept. 2008", labsize(vsmall) angle(45)) xmtick(552(1)587) xtitle("Year-Specific Month") title("Ramadi") saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/ramadi.gph", replace)
tw bar pc_spent_detain moyr if district=="Samarra", ytitle("Detainee Release Spending/1000 Pop.") xlabel(552 "Jan. 2006" 556 "May 2006" 560 "Sept. 2006" 564 "Jan. 2007" 568 "May 2007" 572 "Sept. 2007" 576 "Jan. 2008" 580 "May 2008" 584 "Sept. 2008", labsize(vsmall) angle(45)) xmtick(552(1)587) xtitle("Year-Specific Month") title("Samarra") saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/samarra.gph", replace)
tw bar pc_spent_detain moyr if district=="Al-Hawiga", ytitle("Detainee Release Spending/1000 Pop.") xlabel(552 "Jan. 2006" 556 "May 2006" 560 "Sept. 2006" 564 "Jan. 2007" 568 "May 2007" 572 "Sept. 2007" 576 "Jan. 2008" 580 "May 2008" 584 "Sept. 2008", labsize(vsmall) angle(45)) xmtick(552(1)587) xtitle("Year-Specific Month") title("Al-Hawiga") saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/alhawiga.gph", replace)
tw bar pc_spent_detain moyr if district=="Baiji", ytitle("Detainee Release Spending/1000 Pop.") xlabel(552 "Jan. 2006" 556 "May 2006" 560 "Sept. 2006" 564 "Jan. 2007" 568 "May 2007" 572 "Sept. 2007" 576 "Jan. 2008" 580 "May 2008" 584 "Sept. 2008", labsize(vsmall) angle(45)) xmtick(552(1)587) xtitle("Year-Specific Month") title("Baiji") saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/baiji.gph", replace)
tw bar pc_spent_detain moyr if district=="Baladrooz", ytitle("Detainee Release Spending/1000 Pop.") xlabel(552 "Jan. 2006" 556 "May 2006" 560 "Sept. 2006" 564 "Jan. 2007" 568 "May 2007" 572 "Sept. 2007" 576 "Jan. 2008" 580 "May 2008" 584 "Sept. 2008", labsize(vsmall) angle(45)) xmtick(552(1)587) xtitle("Year-Specific Month") title("Baladrooz") saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/baladrooz.gph", replace)
tw bar pc_spent_detain moyr if district=="Diwaniya", ytitle("Detainee Release Spending/1000 Pop.") xlabel(552 "Jan. 2006" 556 "May 2006" 560 "Sept. 2006" 564 "Jan. 2007" 568 "May 2007" 572 "Sept. 2007" 576 "Jan. 2008" 580 "May 2008" 584 "Sept. 2008", labsize(vsmall) angle(45)) xmtick(552(1)587) xtitle("Year-Specific Month") title("Diwaniya") saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/diwaniya.gph", replace)
tw bar pc_spent_detain moyr if district=="Falluja", ytitle("Detainee Release Spending/1000 Pop.") xlabel(552 "Jan. 2006" 556 "May 2006" 560 "Sept. 2006" 564 "Jan. 2007" 568 "May 2007" 572 "Sept. 2007" 576 "Jan. 2008" 580 "May 2008" 584 "Sept. 2008", labsize(vsmall) angle(45)) xmtick(552(1)587) xtitle("Year-Specific Month") title("Falluja") saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/falluja.gph", replace)
tw bar pc_spent_detain moyr if district=="Kerbala", ytitle("Detainee Release Spending/1000 Pop.") xlabel(552 "Jan. 2006" 556 "May 2006" 560 "Sept. 2006" 564 "Jan. 2007" 568 "May 2007" 572 "Sept. 2007" 576 "Jan. 2008" 580 "May 2008" 584 "Sept. 2008", labsize(vsmall) angle(45)) xmtick(552(1)587) xtitle("Year-Specific Month") title("Kerbala") saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/kerbala.gph", replace)
tw bar pc_spent_detain moyr if district=="Khadamiya", ytitle("Detainee Release Spending/1000 Pop.") xlabel(552 "Jan. 2006" 556 "May 2006" 560 "Sept. 2006" 564 "Jan. 2007" 568 "May 2007" 572 "Sept. 2007" 576 "Jan. 2008" 580 "May 2008" 584 "Sept. 2008", labsize(vsmall) angle(45)) xmtick(552(1)587) xtitle("Year-Specific Month") title("Khadamiya") saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/khadamiya.gph", replace)
tw bar pc_spent_detain moyr if district=="Kirkuk", ytitle("Detainee Release Spending/1000 Pop.") xlabel(552 "Jan. 2006" 556 "May 2006" 560 "Sept. 2006" 564 "Jan. 2007" 568 "May 2007" 572 "Sept. 2007" 576 "Jan. 2008" 580 "May 2008" 584 "Sept. 2008", labsize(vsmall) angle(45)) xmtick(552(1)587) xtitle("Year-Specific Month") title("Kirkuk") saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/kirkuk.gph", replace)
tw bar pc_spent_detain moyr if district=="Al-Muqdadiya", ytitle("Detainee Release Spending/1000 Pop.") xlabel(552 "Jan. 2006" 556 "May 2006" 560 "Sept. 2006" 564 "Jan. 2007" 568 "May 2007" 572 "Sept. 2007" 576 "Jan. 2008" 580 "May 2008" 584 "Sept. 2008", labsize(vsmall) angle(45)) xmtick(552(1)587) xtitle("Year-Specific Month") title("Al-Muqdadiya") saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/almuqdadiya.gph", replace)
tw bar pc_spent_detain moyr if district=="Hamza", ytitle("Detainee Release Spending/1000 Pop.") xlabel(552 "Jan. 2006" 556 "May 2006" 560 "Sept. 2006" 564 "Jan. 2007" 568 "May 2007" 572 "Sept. 2007" 576 "Jan. 2008" 580 "May 2008" 584 "Sept. 2008", labsize(vsmall) angle(45)) xmtick(552(1)587) xtitle("Year-Specific Month") title("Hamza") saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/hamza.gph", replace)
tw bar pc_spent_detain moyr if district=="Tikrit", ytitle("Detainee Release Spending/1000 Pop.") xlabel(552 "Jan. 2006" 556 "May 2006" 560 "Sept. 2006" 564 "Jan. 2007" 568 "May 2007" 572 "Sept. 2007" 576 "Jan. 2008" 580 "May 2008" 584 "Sept. 2008", labsize(vsmall) angle(45)) xmtick(552(1)587) xtitle("Year-Specific Month") title("Tikrit") saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/tikrit.gph", replace)
tw bar pc_spent_detain moyr if district=="Balad", ytitle("Detainee Release Spending/1000 Pop.") xlabel(552 "Jan. 2006" 556 "May 2006" 560 "Sept. 2006" 564 "Jan. 2007" 568 "May 2007" 572 "Sept. 2007" 576 "Jan. 2008" 580 "May 2008" 584 "Sept. 2008", labsize(vsmall) angle(45)) xmtick(552(1)587) xtitle("Year-Specific Month") title("Balad") saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/balad.gph", replace)
tw bar pc_spent_detain moyr if district=="Mada'in", ytitle("Detainee Release Spending/1000 Pop.") xlabel(552 "Jan. 2006" 556 "May 2006" 560 "Sept. 2006" 564 "Jan. 2007" 568 "May 2007" 572 "Sept. 2007" 576 "Jan. 2008" 580 "May 2008" 584 "Sept. 2008", labsize(vsmall) angle(45)) xmtick(552(1)587) xtitle("Year-Specific Month") title("Mada'in") saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/madain.gph", replace)

graph combine "~/Dropbox/Projects/Detainee Operations/Detention Figures/basrah.gph" "~/Dropbox/Projects/Detainee Operations/Detention Figures/abughraib.gph" "~/Dropbox/Projects/Detainee Operations/Detention Figures/alresafa.gph" "~/Dropbox/Projects/Detainee Operations/Detention Figures/alsadr.gph" "~/Dropbox/Projects/Detainee Operations/Detention Figures/almusayab.gph" "~/Dropbox/Projects/Detainee Operations/Detention Figures/heet.gph" "~/Dropbox/Projects/Detainee Operations/Detention Figures/hilla.gph" "~/Dropbox/Projects/Detainee Operations/Detention Figures/mahmoudiya.gph" "~/Dropbox/Projects/Detainee Operations/Detention Figures/mosul.gph" "~/Dropbox/Projects/Detainee Operations/Detention Figures/nassriya.gph" "~/Dropbox/Projects/Detainee Operations/Detention Figures/ramadi.gph" "~/Dropbox/Projects/Detainee Operations/Detention Figures/samarra.gph" "~/Dropbox/Projects/Detainee Operations/Detention Figures/alhawiga.gph" "~/Dropbox/Projects/Detainee Operations/Detention Figures/baiji.gph" "~/Dropbox/Projects/Detainee Operations/Detention Figures/baladrooz.gph" "~/Dropbox/Projects/Detainee Operations/Detention Figures/diwaniya.gph" "~/Dropbox/Projects/Detainee Operations/Detention Figures/falluja.gph" "~/Dropbox/Projects/Detainee Operations/Detention Figures/kerbala.gph" "~/Dropbox/Projects/Detainee Operations/Detention Figures/khadamiya.gph" "~/Dropbox/Projects/Detainee Operations/Detention Figures/kirkuk.gph" "~/Dropbox/Projects/Detainee Operations/Detention Figures/almuqdadiya.gph" "~/Dropbox/Projects/Detainee Operations/Detention Figures/hamza.gph" "~/Dropbox/Projects/Detainee Operations/Detention Figures/tikrit.gph" "~/Dropbox/Projects/Detainee Operations/Detention Figures/balad.gph" "~/Dropbox/Projects/Detainee Operations/Detention Figures/madain.gph", rows(5) iscale(.75*)

restore


***************************************************** SUMMARY STATISTICS *****************************************************************************


estpost sum $dv pc_spent_detain i_spent_detain totaldetainees $sumstat [aw=population2003] if obsdrop==0 & year>=2004

esttab using "/Users/christopherblair/Desktop/sumstat.tex", replace label title(Descriptive Statistics) cells("count mean sd min max")


********************************** CORRELATES OF DETAINEE RELEASE SPENDING *********************************************************************


eststo spend1: reghdfe d.pc_spent_detain soi tif adha hajj ashura usprt cmoc D.(l.pc_instot_sigac l.pc_ibc_coalition batt_sw l.pc_spent_cap l.pc_spent_cerp_small_nondetain) [aw= pop100k] if obsdrop==0 & year>=2004, cluster(distid) absorb(distid qtyr)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/spending.tex", tex(land) label dec(4) replace ctitle() keep(soi tif adha hajj ashura usprt cmoc Dl.pc_instot_sigac Dl.pc_ibc_coalition Dl.ibc_insurgent_min D.batt_sw Dl.pc_spent_cap Dl.pc_spent_cerp_small_nondetain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

eststo spend2: reghdfe d.pc_spent_detain soi tif adha hajj ashura usprt cmoc D.(l.pc_instot_sigact l.pc_ibc_coalition batt_sw l.pc_spent_cap l.pc_spent_cerp_small_nondetain) [aw= pop100k] if obsdrop==0 & year>=2004, cluster(distid) absorb(distid qtyr##c.sunni_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/spending.tex", tex(land) label dec(4) append ctitle() keep(soi tif adha hajj ashura usprt cmoc Dl.pc_instot_sigac Dl.pc_ibc_coalition Dl.ibc_insurgent_min D.batt_sw Dl.pc_spent_cap Dl.pc_spent_cerp_small_nondetain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

eststo spend3: reghdfe d.pc_spent_detain soi tif adha hajj ashura usprt cmoc D.(l.pc_instot_sigact l.pc_ibc_coalition batt_sw l.pc_spent_cap l.pc_spent_cerp_small_nondetain) [aw= pop100k] if obsdrop==0 & year>=2004, cluster(distid) absorb(distid qtyr##c.sunni_voteshare qtyr##c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/spending.tex", tex(land) label dec(4) append ctitle() keep(soi tif adha hajj ashura usprt cmoc Dl.pc_instot_sigac Dl.pc_ibc_coalition Dl.ibc_insurgent_min D.batt_sw Dl.pc_spent_cap Dl.pc_spent_cerp_small_nondetain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

eststo spend4: reghdfe d.pc_spent_detain soi tif adha hajj ashura usprt cmoc D.(l.pc_instot_sigact l.clearance_rate2 l.pc_ibc_coalition batt_sw l.pc_spent_cap l.pc_spent_cerp_small_nondetain) [aw= pop100k] if obsdrop==0 & year>=2004, cluster(distid) absorb(distid qtyr##c.sunni_voteshare qtyr##c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/spending.tex", tex(land) label dec(4) append ctitle() keep(soi tif adha hajj ashura usprt cmoc Dl.pc_instot_sigac Dl.pc_ibc_coalition Dl.ibc_insurgent_min D.batt_sw Dl.pc_spent_cap Dl.pc_spent_cerp_small_nondetain Dl.clearance_rate2) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

eststo spend5: reghdfe d.pc_spent_detain soi tif adha hajj ashura usprt cmoc D.(l.pc_instot_sigact l.clearance_rate2 l.pc_ibc_coalition batt_sw l.pc_spent_cap l.pc_spent_cerp_small_nondetain) [aw= pop100k] if obsdrop==0 & year>=2004 & britishzone==0, cluster(distid) absorb(distid qtyr##c.sunni_voteshare qtyr##c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/spending.tex", tex(land) label dec(4) append ctitle() keep(soi tif adha hajj ashura usprt cmoc Dl.pc_instot_sigac Dl.pc_ibc_coalition Dl.ibc_insurgent_min D.batt_sw Dl.pc_spent_cap Dl.pc_spent_cerp_small_nondetain Dl.clearance_rate2) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')


************************************************** MAIN RESULTS *********************************************************************


reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/main1.tex", tex(land) label dec(4) replace ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain Dl.pc_wits_insurgent Dl.pc_ibc_coalition D.batt_sw Dl.pc_spent_cap Dl.pc_spent_cerp_small_nondetain D.pcturban D.urate Dl.pc_instot_sigact Dl.splag_pc_instot_sigact Dl.clearance_rate2 $binary) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/main1.tex", tex(land) label dec(4) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain Dl.pc_wits_insurgent Dl.pc_ibc_coalition D.batt_sw Dl.pc_spent_cap Dl.pc_spent_cerp_small_nondetain D.pcturban D.urate Dl.pc_instot_sigact Dl.splag_pc_instot_sigact Dl.clearance_rate2 $binary) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/main1.tex", tex(land) label dec(4) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain Dl.pc_wits_insurgent Dl.pc_ibc_coalition D.batt_sw Dl.pc_spent_cap Dl.pc_spent_cerp_small_nondetain D.pcturban D.urate Dl.pc_instot_sigact Dl.splag_pc_instot_sigact Dl.clearance_rate2 $binary) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/main1.tex", tex(land) label dec(4) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain Dl.pc_wits_insurgent Dl.pc_ibc_coalition D.batt_sw Dl.pc_spent_cap Dl.pc_spent_cerp_small_nondetain D.pcturban D.urate Dl.pc_instot_sigact Dl.splag_pc_instot_sigact Dl.clearance_rate2 $binary) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/main1.tex", tex(land) label dec(4) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain Dl.pc_wits_insurgent Dl.pc_ibc_coalition D.batt_sw Dl.pc_spent_cap Dl.pc_spent_cerp_small_nondetain D.pcturban D.urate Dl.pc_instot_sigact Dl.splag_pc_instot_sigact Dl.clearance_rate2 $binary) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/main1.tex", tex(land) label dec(4) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain Dl.pc_wits_insurgent Dl.pc_ibc_coalition D.batt_sw Dl.pc_spent_cap Dl.pc_spent_cerp_small_nondetain D.pcturban D.urate Dl.pc_instot_sigact Dl.splag_pc_instot_sigact Dl.clearance_rate2 $binary) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/main1.tex", tex(land) label dec(4) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain Dl.pc_wits_insurgent Dl.pc_ibc_coalition D.batt_sw Dl.pc_spent_cap Dl.pc_spent_cerp_small_nondetain D.pcturban D.urate Dl.pc_instot_sigact Dl.splag_pc_instot_sigact Dl.clearance_rate2 $binary) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/main1.tex", tex(land) label dec(4) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain Dl.pc_wits_insurgent Dl.pc_ibc_coalition D.batt_sw Dl.pc_spent_cap Dl.pc_spent_cerp_small_nondetain D.pcturban D.urate Dl.pc_instot_sigact Dl.splag_pc_instot_sigact Dl.clearance_rate2 $binary) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')


************************************************** OSTER BOUNDS *********************************************************************


areg d.pc_instot_sigact ddetain D.($continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary i.moyr##c.sunni_voteshare i.moyr#c.shia_voteshare i.govid#i.dcgdo [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0, cluster(distid) absorb(distid)

psacalc delta ddetain, rmax(.44798)
psacalc delta ddetain, rmax(.6892)
psacalc delta ddetain, rmax(.89596)


************************************** CONTROLLING FOR NON-TIF DETAINEES *********************************************************************


reghdfe d.pc_instot_sigact D.(pc_spent_detain apprx_dha_comm $continuous) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/main2.tex", tex(land) label dec(4) replace ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain D.apprx_dha_comm Dl.pc_wits_insurgent Dl.pc_ibc_coalition D.batt_sw Dl.pc_spent_cap Dl.pc_spent_cerp_small_nondetain D.pcturban D.urate Dl.pc_instot_sigact Dl.splag_pc_instot_sigact $binary) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain apprx_dha_comm $continuous) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/main2.tex", tex(land) label dec(4) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain D.apprx_dha_comm Dl.pc_wits_insurgent Dl.pc_ibc_coalition D.batt_sw Dl.pc_spent_cap Dl.pc_spent_cerp_small_nondetain D.pcturban D.urate Dl.pc_instot_sigact Dl.splag_pc_instot_sigact $binary) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain apprx_dha_comm $continuous) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/main2.tex", tex(land) label dec(4) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain D.apprx_dha_comm Dl.pc_wits_insurgent Dl.pc_ibc_coalition D.batt_sw Dl.pc_spent_cap Dl.pc_spent_cerp_small_nondetain D.pcturban D.urate Dl.pc_instot_sigact Dl.splag_pc_instot_sigact $binary) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain apprx_dha_comm $continuous l.pc_instot_sigact) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/main2.tex", tex(land) label dec(4) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain D.apprx_dha_comm Dl.pc_wits_insurgent Dl.pc_ibc_coalition D.batt_sw Dl.pc_spent_cap Dl.pc_spent_cerp_small_nondetain D.pcturban D.urate Dl.pc_instot_sigact Dl.splag_pc_instot_sigact $binary) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain apprx_dha_comm $continuous l.pc_instot_sigact l.splag_pc_instot_sigact) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/main2.tex", tex(land) label dec(4) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain D.apprx_dha_comm Dl.pc_wits_insurgent Dl.pc_ibc_coalition D.batt_sw Dl.pc_spent_cap Dl.pc_spent_cerp_small_nondetain D.pcturban D.urate Dl.pc_instot_sigact Dl.splag_pc_instot_sigact $binary) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain apprx_dha_comm $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/main2.tex", tex(land) label dec(4) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain D.apprx_dha_comm Dl.pc_wits_insurgent Dl.pc_ibc_coalition D.batt_sw Dl.pc_spent_cap Dl.pc_spent_cerp_small_nondetain D.pcturban D.urate Dl.pc_instot_sigact Dl.splag_pc_instot_sigact $binary) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain apprx_dha_comm $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/main2.tex", tex(land) label dec(4) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain D.apprx_dha_comm Dl.pc_wits_insurgent Dl.pc_ibc_coalition D.batt_sw Dl.pc_spent_cap Dl.pc_spent_cerp_small_nondetain D.pcturban D.urate Dl.pc_instot_sigact Dl.splag_pc_instot_sigact $binary) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain apprx_dha_comm $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/main2.tex", tex(land) label dec(4) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain D.apprx_dha_comm Dl.pc_wits_insurgent Dl.pc_ibc_coalition D.batt_sw Dl.pc_spent_cap Dl.pc_spent_cerp_small_nondetain D.pcturban D.urate Dl.pc_instot_sigact Dl.splag_pc_instot_sigact $binary) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')


************************************** SUBSETTING TO ISLAMIC HOLIDAYS *********************************************************************


reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw= population2003] if year>=2004 & obsdrop==0 & holiday==1, cluster(distid) absorb(distid moyr)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/main3.tex", tex(land) label dec(3) replace ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain Dl.pc_wits_insurgent Dl.pc_ibc_coalition D.batt_sw Dl.pc_spent_cap Dl.pc_spent_cerp_small_nondetain D.pcturban D.urate Dl.pc_instot_sigact Dl.splag_pc_instot_sigact $binary) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw= population2003] if year>=2004 & obsdrop==0 & holiday==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/main3.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain Dl.pc_wits_insurgent Dl.pc_ibc_coalition D.batt_sw Dl.pc_spent_cap Dl.pc_spent_cerp_small_nondetain D.pcturban D.urate Dl.pc_instot_sigact Dl.splag_pc_instot_sigact $binary) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw= population2003] if year>=2004 & obsdrop==0 & holiday==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/main3.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain Dl.pc_wits_insurgent Dl.pc_ibc_coalition D.batt_sw Dl.pc_spent_cap Dl.pc_spent_cerp_small_nondetain D.pcturban D.urate Dl.pc_instot_sigact Dl.splag_pc_instot_sigact $binary) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact) $binary [aw= population2003] if year>=2004 & obsdrop==0 & holiday==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/main3.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain Dl.pc_wits_insurgent Dl.pc_ibc_coalition D.batt_sw Dl.pc_spent_cap Dl.pc_spent_cerp_small_nondetain D.pcturban D.urate Dl.pc_instot_sigact Dl.splag_pc_instot_sigact $binary) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact) $binary [aw= population2003] if year>=2004 & obsdrop==0 & holiday==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/main3.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain Dl.pc_wits_insurgent Dl.pc_ibc_coalition D.batt_sw Dl.pc_spent_cap Dl.pc_spent_cerp_small_nondetain D.pcturban D.urate Dl.pc_instot_sigact Dl.splag_pc_instot_sigact $binary) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & holiday==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/main3.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain Dl.pc_wits_insurgent Dl.pc_ibc_coalition D.batt_sw Dl.pc_spent_cap Dl.pc_spent_cerp_small_nondetain D.pcturban D.urate Dl.pc_instot_sigact Dl.splag_pc_instot_sigact $binary) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & holiday==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/main3.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain Dl.pc_wits_insurgent Dl.pc_ibc_coalition D.batt_sw Dl.pc_spent_cap Dl.pc_spent_cerp_small_nondetain D.pcturban D.urate Dl.pc_instot_sigact Dl.splag_pc_instot_sigact $binary) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0 & holiday==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/main3.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain D.apprx_dha_comm Dl.pc_wits_insurgent Dl.pc_ibc_coalition D.batt_sw Dl.pc_spent_cap Dl.pc_spent_cerp_small_nondetain D.pcturban D.urate Dl.pc_instot_sigact Dl.splag_pc_instot_sigact $binary) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')


************************************** EXTENSIVE MARGIN OF SPENDING *********************************************************************


reghdfe d.pc_instot_sigact D.(i_spent_detain $continuous) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/main4.tex", tex(land) label dec(3) replace ctitle(Insurgent SIGACTS) keep(D.i_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(i_spent_detain $continuous) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/main4.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.i_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(i_spent_detain $continuous) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/main4.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.i_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(i_spent_detain $continuous l.pc_instot_sigact) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/main4.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.i_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(i_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/main4.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.i_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(i_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/main4.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.i_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(i_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/main4.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.i_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(i_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/main4.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.i_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')


************************************************** SECTARIAN HETEROGENEITY *********************************************************************


eststo main: reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/sect1.tex", tex(land) label dec(3) replace ctitle(Main) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

eststo mixed: reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0 &  mixed_vote==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/sect1.tex", tex(land) label dec(3) append ctitle(Mixed) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

eststo sunnimixed: reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0 & (mixed_vote==1 | sunni_vote==1), cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/sect1.tex", tex(land) label dec(3) append ctitle(Sunni/Mixed) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

eststo sunni: reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0 & sunni_vote==1, cluster(distid) absorb(distid moyr##c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/sect1.tex", tex(land) label dec(3) append ctitle(Sunni) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

eststo shia: reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0 & shia_vote==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/sect1.tex", tex(land) label dec(3) append ctitle(Shia) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

eststo full: reghdfe d.pc_instot_sigact c.ddetain##shia_vote c.ddetain##sunni_vote D.( $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/sect1.tex", tex(land) label dec(3) append ctitle(Interacted) keep(ddetain c.ddetain#1.shia_vote c.ddetain#1.sunni_vote) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')


************************************************** SECTARIAN ARMED GROUPS *********************************************************************


eststo main: reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton

eststo aqi: reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0 & aqiarea==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton

eststo reject: reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0 & rejectarea==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton

eststo jam: reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0 & jamarea==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton

coefplot (main, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (aqi, msymbol(S) msize(medium) mlcolor(black) mfcolor(black)) (reject, msymbol(D) msize(medium) mlcolor(black) mfcolor(black)) (jam, msymbol(T) msize(medium) mlcolor(black) mfcolor(black)), yline(0, lcolor(cranberry%50) lpatter(- -)) yline(0.05, lcolor(gs10) lpatter(...)) yline(-.35, lcolor(gs10) lpatter(...)) keep(D.pc_spent_detain) ci(95) ylabel(-0.35(.05).05) ymtick(-0.35(.01).05) xlabel(1 "Effect of Detainee Release Spending/1000 Pop.", angle(h) labs(medium)) legend(off) ciopts(lwidth(0.55) lcolor(black)) vert ytitle("Insurgent-Initiated SIGACTs/1000 Pop.", size(medium)) text(-.072 .7 "All Areas", place(s) size(small)) text(-.072 .9 "AQI Areas", place(s) size(small)) text(-.072 1.1 "Rejectionist Areas", place(s) size(small)) text(-.013 1.3 "JaM Areas", place(s) size(small))


************************************************** SHIA AREAS *********************************************************************


reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0 & shia_vote==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/shia.tex", tex(land) label dec(3) replace ctitle(Shia) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= shiadet] if year>=2004 & obsdrop==0 & britishzone==0 & shia_vote==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/shia.tex", tex(land) label dec(3) append ctitle(Shia) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= shiaratio] if year>=2004 & obsdrop==0 & britishzone==0 & shia_vote==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/shia.tex", tex(land) label dec(3) append ctitle(Shia) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0 & jamarea==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/shia.tex", tex(land) label dec(3) append ctitle(Shia) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= shiadet] if year>=2004 & obsdrop==0 & britishzone==0 & jamarea==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/shia.tex", tex(land) label dec(3) append ctitle(Shia) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= shiaratio] if year>=2004 & obsdrop==0 & britishzone==0 & jamarea==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/shia.tex", tex(land) label dec(3) append ctitle(Shia) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')


************************************************** INSURGENT TACTICS *********************************************************************


eststo df: reghdfe d.pc_df_sigact D.(pc_spent_detain $continuous l.pc_df_sigact l.splag_pc_df_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo dfms: reghdfe d.pc_df_sigact D.(pc_spent_detain $continuous l.pc_df_sigact l.splag_pc_df_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0 & (mixed_vote==1 | sunni_vote==1), cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo dfshia: reghdfe d.pc_df_sigact D.(pc_spent_detain $continuous l.pc_df_sigact l.splag_pc_df_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0 & shia_vote==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
coefplot (df, msymbol(O) msize(medlarge) mlcolor(black) mfcolor(black)) (dfms, msymbol(S) msize(medlarge) mlcolor(black) mfcolor(white)) (dfshia, msymbol(T) msize(medlarge) mlcolor(black) mfcolor(white)), yline(0, lcolor(cranberry%50) lpatter(- -)) yline(0.05, lcolor(gs10) lpatter(...)) yline(-0.15, lcolor(gs10) lpatter(...)) keep(D.pc_spent_detain) ci(95 90) ylabel(-0.15(.05).05) ymtick(-0.15(.01).05) xlabel(1 "Effect of Detainee Release Spending/1000 Pop.", angle(h) labs(medium)) legend(off) ciopts(lwidth(0.45 1.1) lcolor(black black)) vert ytitle("Insurgent-Initiated SIGACTs/100k Pop.", size(medium)) title("Direct Fire", place(n) bm(medium)) lcolor(black) saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/df_detain.gph", replace)

eststo idf: reghdfe d.pc_idf_sigact D.(pc_spent_detain $continuous l.pc_idf_sigact l.splag_pc_idf_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo idfms: reghdfe d.pc_idf_sigact D.(pc_spent_detain $continuous l.pc_idf_sigact l.splag_pc_idf_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0 & (mixed_vote==1 | sunni_vote==1), cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo idfshia: reghdfe d.pc_idf_sigact D.(pc_spent_detain $continuous l.pc_idf_sigact l.splag_pc_idf_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0 & shia_vote==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
coefplot (idf, msymbol(O) msize(medlarge) mlcolor(black) mfcolor(black)) (idfms, msymbol(S) msize(medlarge) mlcolor(black) mfcolor(white)) (idfshia, msymbol(T) msize(medlarge) mlcolor(black) mfcolor(white)), yline(0, lcolor(cranberry%50) lpatter(- -)) yline(0.02, lcolor(gs10) lpatter(...)) yline(-0.08, lcolor(gs10) lpatter(...)) keep(D.pc_spent_detain) ci(95 90) ylabel(-0.08(.02).02) ymtick(-0.08(.01).02) xlabel(1 "Effect of Detainee Release Spending/1000 Pop.", angle(h) labs(medium)) legend(off) ciopts(lwidth(0.45 1.1) lcolor(black black)) vert ytitle("Insurgent-Initiated SIGACTs/100k Pop.", size(medium)) title("Indirect Fire", place(n) bm(medium)) lcolor(black) saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/idf_detain.gph", replace)

eststo ied: reghdfe d.pc_ied_sigact D.(pc_spent_detain $continuous l.pc_ied_sigact l.splag_pc_ied_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo iedms: reghdfe d.pc_ied_sigact D.(pc_spent_detain $continuous l.pc_ied_sigact l.splag_pc_ied_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0 & (mixed_vote==1 | sunni_vote==1), cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo iedshia: reghdfe d.pc_ied_sigact D.(pc_spent_detain $continuous l.pc_ied_sigact l.splag_pc_ied_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0 & shia_vote==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
coefplot (ied, msymbol(O) msize(medlarge) mlcolor(black) mfcolor(black)) (iedms, msymbol(S) msize(medlarge) mlcolor(black) mfcolor(white)) (iedshia, msymbol(T) msize(medlarge) mlcolor(black) mfcolor(white)), yline(0, lcolor(cranberry%50) lpatter(- -)) keep(D.pc_spent_detain) ci(95 90) ylabel(-0.2(.02).02) ymtick(-0.2(.01).02) xlabel(1 "Effect of Detainee Release Spending/1000 Pop.", angle(h) labs(medium)) legend(off) ciopts(lwidth(0.45 1.1) lcolor(black black)) vert ytitle("Insurgent-Initiated SIGACTs/100k Pop.", size(medium)) title("IEDs", place(n) bm(medium)) lcolor(black) saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/ied_detain.gph", replace)

eststo suic: reghdfe d.pc_suicide_sigact D.(pc_spent_detain $continuous l.pc_suicide_sigact l.splag_pc_suicide_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo suicms: reghdfe d.pc_suicide_sigact D.(pc_spent_detain $continuous l.pc_suicide_sigact l.splag_pc_suicide_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0 & (mixed_vote==1 | sunni_vote==1), cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo suicshia: reghdfe d.pc_suicide_sigact D.(pc_spent_detain $continuous l.pc_suicide_sigact l.splag_pc_suicide_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0 & shia_vote==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
coefplot (suic, msymbol(O) msize(medlarge) mlcolor(black) mfcolor(black)) (suicms, msymbol(S) msize(medlarge) mlcolor(black) mfcolor(white)) (suicshia, msymbol(T) msize(medlarge) mlcolor(black) mfcolor(white)), yline(0, lcolor(cranberry%50) lpatter(- -)) yline(0.004, lcolor(gs10) lpatter(...)) yline(-0.004, lcolor(gs10) lpatter(...)) keep(D.pc_spent_detain) ci(95 90) ylabel(-0.004(.002).004) ymtick(-0.004(.001).004) xlabel(1 "Effect of Detainee Release Spending/1000 Pop.", angle(h) labs(medium)) legend(off) ciopts(lwidth(0.45 1.1) lcolor(black black)) vert ytitle("Insurgent-Initiated SIGACTs/100k Pop.", size(medium)) title("Suicide Bombings", place(n) bm(medium)) lcolor(black) saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/suicide_detain.gph", replace)

graph combine "~/Dropbox/Projects/Detainee Operations/Detention Figures/df_detain" "~/Dropbox/Projects/Detainee Operations/Detention Figures/ied_detain.gph" "~/Dropbox/Projects/Detainee Operations/Detention Figures/idf_detain.gph" "~/Dropbox/Projects/Detainee Operations/Detention Figures/suicide_detain.gph", rows(1) iscale(.75*)

eststo cv: reghdfe d.pc_wits_insurgent D.(pc_spent_detain $continuous l.pc_wits_insurgent l.splag_pc_wits_insurgent l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo cvms: reghdfe d.pc_wits_insurgent D.(pc_spent_detain $continuous l.pc_wits_insurgent l.splag_pc_wits_insurgent l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0 & (mixed_vote==1 | sunni_vote==1), cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo cvshia: reghdfe d.pc_wits_insurgent D.(pc_spent_detain $continuous l.pc_wits_insurgent l.splag_pc_wits_insurgent l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0 & shia_vote==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
coefplot (cv, msymbol(O) msize(medlarge) mlcolor(black) mfcolor(black)) (cvms, msymbol(S) msize(medlarge) mlcolor(black) mfcolor(white)) (cvshia, msymbol(T) msize(medlarge) mlcolor(black) mfcolor(white)), yline(0, lcolor(cranberry%50) lpatter(- -)) yline(0.05, lcolor(gs10) lpatter(...)) yline(-0.1, lcolor(gs10) lpatter(...)) keep(D.pc_spent_detain) ci(95 90) ylabel(-0.1(.05).05) ymtick(-0.1(.01).05) xlabel(1 "Effect of Detainee Release Spending/1000 Pop.", angle(h) labs(medium)) legend(off) ciopts(lwidth(0.45 1.1) lcolor(black black)) vert ytitle("Civilian Victimization/100k Pop.", size(medium)) title("WITS Incidents", place(n) bm(medium)) lcolor(black) saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/wits_detain.gph", replace)

eststo ibc: reghdfe d.pc_ibc_insurgent D.(pc_spent_detain $continuous l.pc_ibc_insurgent l.splag_pc_ibc_insurgent l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo ibcms: reghdfe d.pc_ibc_insurgent D.(pc_spent_detain $continuous l.pc_ibc_insurgent l.splag_pc_ibc_insurgent l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0 & (mixed_vote==1 | sunni_vote==1), cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo ibcshia: reghdfe d.pc_ibc_insurgent D.(pc_spent_detain $continuous l.pc_ibc_insurgent l.splag_pc_ibc_insurgent l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0 & shia_vote==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
coefplot (ibc, msymbol(O) msize(medlarge) mlcolor(black) mfcolor(black)) (ibcms, msymbol(S) msize(medlarge) mlcolor(black) mfcolor(white)) (ibcshia, msymbol(T) msize(medlarge) mlcolor(black) mfcolor(white)), yline(0, lcolor(cranberry%50) lpatter(- -)) yline(0.02, lcolor(gs10) lpatter(...)) yline(-0.01, lcolor(gs10) lpatter(...)) keep(D.pc_spent_detain) ci(95 90) ylabel(-0.01(.01).02) ymtick(-0.01(.005).02) xlabel(1 "Effect of Detainee Release Spending/1000 Pop.", angle(h) labs(medium)) legend(off) ciopts(lwidth(0.45 1.1) lcolor(black black)) vert ytitle("Civilian Victimization/100k Pop.", size(medium)) title("Insurgent Killings", place(n) bm(medium)) lcolor(black) saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/ins_detain.gph", replace)

eststo sect: reghdfe d.pc_ibc_sectarian D.(pc_spent_detain $continuous l.pc_ibc_sectarian l.splag_pc_ibc_sectarian l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo sectms: reghdfe d.pc_ibc_sectarian D.(pc_spent_detain $continuous l.pc_ibc_sectarian l.splag_pc_ibc_sectarian l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0 & (mixed_vote==1 | sunni_vote==1), cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo sectshia: reghdfe d.pc_ibc_sectarian D.(pc_spent_detain $continuous l.pc_ibc_sectarian l.splag_pc_ibc_sectarian l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0 & shia_vote==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
coefplot (sect, msymbol(O) msize(medlarge) mlcolor(black) mfcolor(black)) (sectms, msymbol(S) msize(medlarge) mlcolor(black) mfcolor(white)) (sectshia, msymbol(T) msize(medlarge) mlcolor(black) mfcolor(white)), yline(0, lcolor(cranberry%50) lpatter(- -)) keep(D.pc_spent_detain) ci(95 90) ylabel(-0.03(.01).02) ymtick(-0.03(.005).02) yline(-.03, lpatt(dot) lcolor(gs10)) xlabel(1 "Effect of Detainee Release Spending/1000 Pop.", angle(h) labs(medium)) legend(off) ciopts(lwidth(0.45 1.1) lcolor(black black)) vert ytitle("Civilian Victimization/100k Pop.", size(medium)) title("Sectarian Killings", place(n) bm(medium)) lcolor(black) saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/sect_detain.gph", replace)

eststo unk: reghdfe d.pc_ibc_unknown D.(pc_spent_detain $continuous l.pc_ibc_unknown l.splag_pc_ibc_unknown l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo unkms: reghdfe d.pc_ibc_unknown D.(pc_spent_detain $continuous l.pc_ibc_unknown l.splag_pc_ibc_unknown l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0 & (mixed_vote==1 | sunni_vote==1), cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo unkshia: reghdfe d.pc_ibc_unknown D.(pc_spent_detain $continuous l.pc_ibc_unknown l.splag_pc_ibc_unknown l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0 & shia_vote==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
coefplot (unk, msymbol(O) msize(medlarge) mlcolor(black) mfcolor(black)) (unkms, msymbol(S) msize(medlarge) mlcolor(black) mfcolor(white)) (unkshia, msymbol(T) msize(medlarge) mlcolor(black) mfcolor(white)), yline(0, lcolor(cranberry%50) lpatter(- -)) yline(0.02, lcolor(gs10) lpatter(...)) yline(-0.02, lcolor(gs10) lpatter(...)) keep(D.pc_spent_detain) ci(95 90) ylabel(-0.02(.01).02) ymtick(-0.02(.005).02) xlabel(1 "Effect of Detainee Release Spending/1000 Pop.", angle(h) labs(medium)) legend(off) ciopts(lwidth(0.45 1.1) lcolor(black black)) vert ytitle("Civilian Victimization/100k Pop.", size(medium)) title("Unknown Killings", place(n) bm(medium)) lcolor(black) saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/unk_detain.gph", replace)

graph combine "~/Dropbox/Projects/Detainee Operations/Detention Figures/wits_detain" "~/Dropbox/Projects/Detainee Operations/Detention Figures/sect_detain.gph" "~/Dropbox/Projects/Detainee Operations/Detention Figures/ins_detain.gph" "~/Dropbox/Projects/Detainee Operations/Detention Figures/unk_detain.gph", rows(1) iscale(.75*)


************************************************** TEMPORAL HETEROGENEITY *********************************************************************


eststo all: reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton

eststo presurge: reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= population2003] if year<=2006 & obsdrop==0 & britishzone==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton

eststo surgepost: reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2007 & obsdrop==0 & britishzone==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton

coefplot (all, msymbol(O) msize(medlarge) mlcolor(black) mfcolor(black)) (presurge, msymbol(D) msize(medlarge) mlcolor(black) mfcolor(white)) (surgepost, msymbol(T) msize(medlarge) mlcolor(black) mfcolor(white)), keep(D.pc_spent_detain) ci(95 90) lcolor(black) fcolor(black) ylabel(-.4(.05).05) ymtick(-.4(.01).05) ciopts(lwidth(0.45 1.1) lcolor(black black)) vert yline(0, lcolor(cranberry%50) lpatter(- -)) xlabel(.75 `" "Full Model" "(2004-2008)" "' 1 `" "Pre-Surge" "(2004-2006)" "' 1.25 `" "Surge and After" "(2007-2008)" "') ytitle("Insurgent-Initiated SIGACTs/100k Pop.", size(medsmall)) legend(off) yline(.05, lcolor(gs10) lpatt(...)) yline(-.4, lcolor(gs10) lpatt(...)) title("Heterogeneity Across Pre- and Post-Surge Periods", size(medium)) saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/surge_detain.gph", replace)

eststo presurge_df: reghdfe d.pc_df_sigact D.(pc_spent_detain $continuous l.pc_df_sigact l.splag_pc_df_sigact l.clearance_rate2) $binary [aw= population2003] if year<=2006 & obsdrop==0 & britishzone==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo surgepost_df: reghdfe d.pc_df_sigact D.(pc_spent_detain $continuous l.pc_df_sigact l.splag_pc_df_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2007 & obsdrop==0 & britishzone==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo presurge_ied: reghdfe d.pc_ied_sigact D.(pc_spent_detain $continuous l.pc_ied_sigact l.splag_pc_ied_sigact l.clearance_rate2) $binary [aw= population2003] if year<=2006 & obsdrop==0 & britishzone==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo surgepost_ied: reghdfe d.pc_ied_sigact D.(pc_spent_detain $continuous l.pc_ied_sigact l.splag_pc_ied_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2007 & obsdrop==0 & britishzone==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo presurge_idf: reghdfe d.pc_idf_sigact D.(pc_spent_detain $continuous l.pc_idf_sigact l.splag_pc_idf_sigact l.clearance_rate2) $binary [aw= population2003] if year<=2006 & obsdrop==0 & britishzone==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo surgepost_idf: reghdfe d.pc_idf_sigact D.(pc_spent_detain $continuous l.pc_idf_sigact l.splag_pc_idf_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2007 & obsdrop==0 & britishzone==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo presurge_suic: reghdfe d.pc_suicide_sigact D.(pc_spent_detain $continuous l.pc_suicide_sigact l.splag_pc_suicide_sigact l.clearance_rate2) $binary [aw= population2003] if year<=2006 & obsdrop==0 & britishzone==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo surgepost_suic: reghdfe d.pc_suicide_sigact D.(pc_spent_detain $continuous l.pc_suicide_sigact l.splag_pc_suicide_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2007 & obsdrop==0 & britishzone==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton

coefplot (presurge_df, msymbol(O) msize(medlarge) mlcolor(black) mfcolor(black)) (surgepost_df, msymbol(O) msize(medlarge) mlcolor(black) mfcolor(white)), yline(0, lcolor(cranberry%50) lpatter(- -)) yline(0.02, lcolor(gs10) lpatter(...)) yline(-0.14, lcolor(gs10) lpatter(...)) keep(D.pc_spent_detain) ci(95 90) ylabel(-0.14(.02).02) ymtick(-0.14(.01).02) xlabel(1 "Effect of Detainee Release Spending/1000 Pop.", angle(h) labs(medium)) legend(off) ciopts(lwidth(0.45 1.1) lcolor(black black)) vert ytitle("Insurgent-Initiated SIGACTs/100k Pop.", size(medium)) title("Direct Fire") lcolor(black) saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/df_surge.gph", replace)
coefplot (presurge_ied, msymbol(O) msize(medlarge) mlcolor(black) mfcolor(black)) (surgepost_ied, msymbol(O) msize(medlarge) mlcolor(black) mfcolor(white)), yline(0, lcolor(cranberry%50) lpatter(- -)) yline(0.05, lcolor(gs10) lpatter(...)) yline(-0.25, lcolor(gs10) lpatter(...)) keep(D.pc_spent_detain) ci(95 90) ylabel(-0.25(.05).05) ymtick(-0.25(.01).05) xlabel(1 "Effect of Detainee Release Spending/1000 Pop.", angle(h) labs(medium)) legend(off) ciopts(lwidth(0.45 1.1) lcolor(black black)) vert ytitle("Insurgent-Initiated SIGACTs/100k Pop.", size(medium)) title("IEDs") lcolor(black) saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/ied_surge.gph", replace)
coefplot (presurge_idf, msymbol(O) msize(medlarge) mlcolor(black) mfcolor(black)) (surgepost_idf, msymbol(O) msize(medlarge) mlcolor(black) mfcolor(white)), yline(0, lcolor(cranberry%50) lpatter(- -)) yline(0.01, lcolor(gs10) lpatter(...)) yline(-0.03, lcolor(gs10) lpatter(...)) keep(D.pc_spent_detain) ci(95 90) ylabel(-0.03(.01).01) ymtick(-0.03(.005).01) xlabel(1 "Effect of Detainee Release Spending/1000 Pop.", angle(h) labs(medium)) legend(off) ciopts(lwidth(0.45 1.1) lcolor(black black)) vert ytitle("Insurgent-Initiated SIGACTs/100k Pop.", size(medium)) title("Indirect Fire") lcolor(black) saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/idf_surge.gph", replace)
coefplot (presurge_suic, msymbol(O) msize(medlarge) mlcolor(black) mfcolor(black)) (surgepost_suic, msymbol(O) msize(medlarge) mlcolor(black) mfcolor(white)), yline(0, lcolor(cranberry%50) lpatter(- -)) yline(0.01, lcolor(gs10) lpatter(...)) yline(-0.01, lcolor(gs10) lpatter(...)) keep(D.pc_spent_detain) ci(95 90) ylabel(-0.01(.005).01) ymtick(-0.01(.001).01) xlabel(1 "Effect of Detainee Release Spending/1000 Pop.", angle(h) labs(medium)) legend(off) ciopts(lwidth(0.45 1.1) lcolor(black black)) vert ytitle("Insurgent-Initiated SIGACTs/100k Pop.", size(medium)) title("Suicide Bombings") lcolor(black) saving("~/Dropbox/Projects/Detainee Operations/Detention Figures/suicide_surge.gph", replace)

graph combine "~/Dropbox/Projects/Detainee Operations/Detention Figures/df_surge" "~/Dropbox/Projects/Detainee Operations/Detention Figures/ied_surge" "~/Dropbox/Projects/Detainee Operations/Detention Figures/idf_surge" "~/Dropbox/Projects/Detainee Operations/Detention Figures/suicide_surge", rows(1) iscale(.75*)

eststo dcgdo: reghdfe d.pc_instot_sigact c.ddetain##5.dcgdo c.ddetain#6.dcgdo D.($continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid##dcgdo)

coefplot all dcgdo, drop(LD.pc_wits_insurgent LD.pc_ibc_coalition D.batt_sw LD.pc_spent_cap LD.pc_spent_cerp_small_nondetain D.pcturban D.urate LD.pc_instot_sigact LD.splag_pc_instot_sigact LD.clearance_rate2 _cons $binary) ci(95 90) lcolor(black) fcolor(black) ylabel(-.7(.1).2) ymtick(-.7(.05).2) ciopts(lwidth(0.45 1.1) lcolor(black black)) vert yline(0, lcolor(cranberry%50) lpatter(- -)) xlabel(.89 "Full Model" 2.19 "John D. Gardner"  3.19 "Douglas M. Stone" 4.19 "Garland Wright") legend(off)


************************************************* ROBUSTNESS *************************************************************************************

*************************** Does Future Spending Predict Current Violence? *********************************************************************

reghdfe d.pc_instot_sigact D.(f.i_spent_detain $continuous) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/futspend1.tex", tex(land) label dec(3) replace ctitle(Insurgent SIGACTS) keep(Df.i_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(f.i_spent_detain $continuous) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/futspend1.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(Df.i_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(f.i_spent_detain $continuous) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/futspend1.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(Df.i_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(f.i_spent_detain $continuous l.pc_instot_sigact) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/futspend1.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(Df.i_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(f.i_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/futspend1.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(Df.i_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(f.i_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/futspend1.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(Df.i_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(f.i_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/futspend1.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(Df.i_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(f.i_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/futspend1.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(Df.i_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')


reghdfe ld.pc_instot_sigact D.(spend_fw3ma $continuous) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/futspend2.tex", tex(land) label dec(3) replace ctitle(Insurgent SIGACTS) keep(D.spend_fw3ma) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe ld.pc_instot_sigact D.(spend_fw3ma $continuous) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/futspend2.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.spend_fw3ma) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe ld.pc_instot_sigact D.(spend_fw3ma $continuous) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/futspend2.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.spend_fw3ma) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe ld.pc_instot_sigact D.(spend_fw3ma $continuous l2.pc_instot_sigact) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/futspend2.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.spend_fw3ma) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe ld.pc_instot_sigact D.(spend_fw3ma $continuous l2.pc_instot_sigact l.splag_pc_instot_sigact) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/futspend2.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.spend_fw3ma) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe ld.pc_instot_sigact D.(spend_fw3ma $continuous l2.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/futspend2.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.spend_fw3ma) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe ld.pc_instot_sigact D.(spend_fw3ma $continuous l2.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/futspend2.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.spend_fw3ma) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe ld.pc_instot_sigact D.(spend_fw3ma $continuous l2.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/futspend2.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.spend_fw3ma) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')


*************************** Does Future Violence Predict Current Spending? *********************************************************************


reghdfe d.pc_spent_detain D.(f.pc_instot_sigact $continuous) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/futviol.tex", tex(land) label dec(3) replace ctitle(Insurgent SIGACTS) keep(Df.pc_instot_sigact) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_spent_detain D.(f.pc_instot_sigact $continuous) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/futviol.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(Df.pc_instot_sigact) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_spent_detain D.(f.pc_instot_sigact $continuous) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/futviol.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(Df.pc_instot_sigact) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_spent_detain D.(f.pc_instot_sigact $continuous l.pc_instot_sigact) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/futviol.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(Df.pc_instot_sigact) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_spent_detain D.(f.pc_instot_sigact $continuous l.pc_instot_sigact l.splag_pc_instot_sigact) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/futviol.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(Df.pc_instot_sigact) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_spent_detain D.(f.pc_instot_sigact $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/futviol.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(Df.pc_instot_sigact) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_spent_detain D.(f.pc_instot_sigact $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/futviol.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(Df.pc_instot_sigact) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_spent_detain D.(f.pc_instot_sigact $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= population2003] if year>=2004 & obsdrop==0 & britishzone==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/futviol.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(Df.pc_instot_sigact) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')


************************************** CURRENT INTENSITY WEIGHTS *********************************************************************


reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw= pc_instot_sigact] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/vweight.tex", tex(land) label dec(3) replace ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw= pc_instot_sigact] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/vweight.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw= pc_instot_sigact] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/vweight.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact) $binary [aw= pc_instot_sigact] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/vweight.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact) $binary [aw= pc_instot_sigact] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/vweight.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= pc_instot_sigact] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/vweight.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= pc_instot_sigact] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/vweight.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= pc_instot_sigact] if year>=2004 & obsdrop==0 & britishzone==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/vweight.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')


************************************** LAGGED INTENSITY WEIGHTS *********************************************************************


reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw= lag_6ma] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/lweight.tex", tex(land) label dec(3) replace ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw= lag_6ma] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/lweight.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw= lag_6ma] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/lweight.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact) $binary [aw= lag_6ma] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/lweight.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact) $binary [aw= lag_6ma] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/lweight.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= lag_6ma] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/lweight.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= lag_6ma] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/lweight.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= lag_6ma] if year>=2004 & obsdrop==0 & britishzone==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/lweight.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')


************************************** FORWARD INTENSITY WEIGHTS *********************************************************************


reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw= fwd_6ma] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/fweight.tex", tex(land) label dec(3) replace ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw= fwd_6ma] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/fweight.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw= fwd_6ma] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/fweight.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact) $binary [aw= fwd_6ma] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/fweight.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact) $binary [aw= fwd_6ma] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/fweight.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= fwd_6ma] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/fweight.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= fwd_6ma] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/fweight.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw= fwd_6ma] if year>=2004 & obsdrop==0 & britishzone==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/fweight.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')


************************************** NO POPULATION WEIGHTS *********************************************************************


reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/nopopweight.tex", tex(land) label dec(3) replace ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/nopopweight.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/nopopweight.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact) $binary if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/nopopweight.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact) $binary if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/nopopweight.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/nopopweight.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/nopopweight.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary if year>=2004 & obsdrop==0 & britishzone==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/nopopweight.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')


************************************** TIME-VARYING POPULATION WEIGHTS *********************************************************************


reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw=population] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/tvpopweight.tex", tex(land) label dec(3) replace ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw=population] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/tvpopweight.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw=population] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/tvpopweight.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact) $binary [aw=population] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/tvpopweight.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact) $binary [aw=population] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/tvpopweight.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/tvpopweight.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/tvpopweight.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population] if year>=2004 & obsdrop==0 & britishzone==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/tvpopweight.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')


************************************** PROVINCE CLUSTERED SEs *********************************************************************


reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw=population2003] if year>=2004 & obsdrop==0, cluster(govid) absorb(distid moyr)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/provcluster.tex", tex(land) label dec(3) replace ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw=population2003] if year>=2004 & obsdrop==0, cluster(govid) absorb(distid moyr##c.sunni_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/provcluster.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw=population2003] if year>=2004 & obsdrop==0, cluster(govid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/provcluster.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact) $binary [aw=population2003] if year>=2004 & obsdrop==0, cluster(govid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/provcluster.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact) $binary [aw=population2003] if year>=2004 & obsdrop==0, cluster(govid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/provcluster.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0, cluster(govid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/provcluster.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0, cluster(govid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/provcluster.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0, cluster(govid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/provcluster.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')


************************************** COMMAND CLUSTERED SEs *********************************************************************


reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw=population2003] if year>=2004 & obsdrop==0, cluster(command) absorb(distid moyr)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/commcluster.tex", tex(land) label dec(3) replace ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw=population2003] if year>=2004 & obsdrop==0, cluster(command) absorb(distid moyr##c.sunni_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/commcluster.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw=population2003] if year>=2004 & obsdrop==0, cluster(command) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/commcluster.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact) $binary [aw=population2003] if year>=2004 & obsdrop==0, cluster(command) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/commcluster.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact) $binary [aw=population2003] if year>=2004 & obsdrop==0, cluster(command) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/commcluster.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0, cluster(command) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/commcluster.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0, cluster(command) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/commcluster.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0, cluster(command) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/commcluster.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')



************************************** MARCH 2006 ONWARD *********************************************************************


reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw=population2003] if year>=2004 & obsdrop==0 & moyr>=554, cluster(distid) absorb(distid moyr)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/march06.tex", tex(land) label dec(3) replace ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw=population2003] if year>=2004 & obsdrop==0 & moyr>=554, cluster(distid) absorb(distid moyr##c.sunni_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/march06.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw=population2003] if year>=2004 & obsdrop==0 & moyr>=554, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/march06.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact) $binary [aw=population2003] if year>=2004 & obsdrop==0 & moyr>=554, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/march06.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact) $binary [aw=population2003] if year>=2004 & obsdrop==0 & moyr>=554, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/march06.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & moyr>=554, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/march06.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & moyr>=554, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/march06.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & moyr>=554, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/march06.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')


************************************** ONLY EVER SPENT *********************************************************************


reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw=population2003] if year>=2004 & obsdrop==0 & everspent==1, cluster(distid) absorb(distid moyr)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/everspent.tex", tex(land) label dec(3) replace ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw=population2003] if year>=2004 & obsdrop==0 & everspent==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/everspent.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw=population2003] if year>=2004 & obsdrop==0 & everspent==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/everspent.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact) $binary [aw=population2003] if year>=2004 & obsdrop==0 & everspent==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/everspent.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact) $binary [aw=population2003] if year>=2004 & obsdrop==0 & everspent==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/everspent.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & everspent==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/everspent.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & everspent==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/everspent.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & everspent==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/everspent.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')


************************************** DETAINEE POPULATION WEIGHTS *********************************************************************


reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw=totaldetainees] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/pdspend.tex", tex(land) label dec(3) replace ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw=totaldetainees] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/pdspend.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw=totaldetainees] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/pdspend.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact) $binary [aw=totaldetainees] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/pdspend.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact) $binary [aw=totaldetainees] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/pdspend.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=totaldetainees] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/pdspend.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=totaldetainees] if year>=2004 & obsdrop==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/pdspend.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=totaldetainees] if year>=2004 & obsdrop==0 & britishzone==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/pdspend.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')


************************************** INCLUDING OUTLIERS *********************************************************************


reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw=population2003] if year>=2004 & obsdrop2==0, cluster(distid) absorb(distid moyr)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/outlier.tex", tex(land) label dec(3) replace ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw=population2003] if year>=2004 & obsdrop2==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/outlier.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw=population2003] if year>=2004 & obsdrop2==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/outlier.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact) $binary [aw=population2003] if year>=2004 & obsdrop2==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/outlier.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact) $binary [aw=population2003] if year>=2004 & obsdrop2==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/outlier.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop2==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/outlier.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop2==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/outlier.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop2==0 & britishzone==0, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/outlier.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')


************************************** CEM MATCHING *********************************************************************

*centile ins_6ma if pc_instot_sigact!=., centile (10 33 66 90)

*cem ins_6ma (0 .2890959 4.227913 31.9835) ins_trend1 ins_trend2 ins_trend3 ins_trend4 ins_trend5 ins_trend6, treat(i_spent_detain)

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw=cem_w] if year>=2004 & obsdrop==0 & cem_m==1, cluster(distid) absorb(distid moyr)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/cem.tex", tex(land) label dec(3) replace ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw=cem_w] if year>=2004 & obsdrop==0 & cem_m==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/cem.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous) $binary [aw=cem_w] if year>=2004 & obsdrop==0 & cem_m==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/cem.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact) $binary [aw=cem_w] if year>=2004 & obsdrop==0 & cem_m==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/cem.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact) $binary [aw=cem_w] if year>=2004 & obsdrop==0 & cem_m==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/cem.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=cem_w] if year>=2004 & obsdrop==0 & cem_m==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare)
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/cem.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=cem_w] if year>=2004 & obsdrop==0 & cem_m==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/cem.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=cem_w] if year>=2004 & obsdrop==0 & britishzone==0 & cem_m==1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/cem.tex", tex(land) label dec(3) append ctitle(Insurgent SIGACTS) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')


************************************** DROP INDIVIDUAL SPENDING DISTRICTS *********************************************************************

eststo clear

eststo abughraib: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & district!="Abu Ghraib", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo almahawil: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & district!="Al-Mahawil", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo alresafa: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & district!="Al Resafa", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo alsadr: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & district!="Al Sadr", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo hawiga: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & district!="Al-Hawiga", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo muqdadiya: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & district!="Al-Muqdadiya", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo musayab: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & district!="Al-Musayab", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo baiji: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & district!="Baiji", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo balad: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & district!="Balad", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo baladrooz: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & district!="Baladrooz", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo basrah: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & district!="Basrah", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo diwaniya: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & district!="Diwaniya", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo falluja: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & district!="Falluja", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo hamza: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & district!="Hamza", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo heet: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & district!="Heet", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo hilla: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & district!="Hilla", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo karkh: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & district!="Karkh", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo kerbala: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & district!="Kerbala", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo khadamiya: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & district!="Khadamiya", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo kirkuk: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & district!="Kirkuk", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo madain: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & district!="Mada'in", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo mahmoudiya: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & district!="Mahmoudiya", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo mosul: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & district!="Mosul", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo nassriya: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & district!="Nassriya", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo ramadi: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & district!="Ramadi", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo samarra: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & district!="Samarra", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo tikrit: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & district!="Tikrit", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo tilkaif: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & district!="Tilkaif", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton

coefplot (abughraib, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (almahawil, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (alresafa, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (alsadr, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (hawiga, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (muqdadiya, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (musayab, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (baiji, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (balad, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (baladrooz, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (basrah, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (diwaniya, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (falluja, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (hamza, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (heet, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (hilla, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (karkh, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (kerbala, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (khadamiya, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (kirkuk, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (madain, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (mahmoudiya, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (mosul, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (nassriya, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (ramadi, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (tikrit, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (samarra, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (tilkaif, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)), keep(D.pc_spent_detain) ci(95 90) symbol(O) lcolor(black) fcolor(black) ylabel(-.35(.05).05) ymtick(-.35(.01).05) ciopts(lwidth(0.45 1.1) lcolor(black black)) vert xlabel(.525 "Abu Ghraib" .571 "Al-Mahawil" .606 "Al Resafa" .636 "Al Sadr" .664 "Al-Hawiga" .699 "Al-Muqdadiya" .738 "Al-Musayab" .77 "Baiji" .81 "Balad" .84 "Baladrooz" .876 "Basrah" .91 "Diwaniya" .944 "Falluja" .983 "Hamza" 1.018 "Heet" 1.053 "Hilla" 1.085 "Karkh" 1.122 "Kerbala" 1.152 "Khadamiya" 1.184 "Kirkuk" 1.22 "Mada'in" 1.256 "Mahmoudiya" 1.291 "Mosul" 1.324 "Nassriya" 1.356 "Ramadi" 1.391 "Samarra" 1.428 "Tikrit" 1.466 "Tilkaif", angle(90)) legend(off) ytitle("Insurgent-Initiated SIGACTs/100k Pop.", size(medsmall)) yline(0, lcolor(cranberry%50) lpatter(- -)) yline(0.05, lcolor(gs10) lpatter(...))


************************************** DROP INDIVIDUAL SPENDING PROVINCES *********************************************************************

eststo clear

eststo anbar: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & governorate!="Anbar", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo babylon: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & governorate!="Babylon", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo baghdad: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & governorate!="Baghdad", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo basrah: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & governorate!="Basrah", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo diyala: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & governorate!="Diyala", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo kerbala: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & governorate!="Kerbala", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo ninewa: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & governorate!="Ninewa", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo qadissiya: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & governorate!="Qadissiya", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo salahaldin: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & governorate!="Salah al-Din", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo tameem: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & governorate!="Tameem", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
eststo thiqar: qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & governorate!="Thi-Qar", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton

coefplot(anbar, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (babylon, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (baghdad, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (basrah, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (diyala, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (kerbala, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (ninewa, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (qadissiya, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (salahaldin, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (tameem, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (thiqar, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)), keep(D.pc_spent_detain) ci(95 90) symbol(O) lcolor(black) fcolor(black) ylabel(-.35(.05).05) ymtick(-.35(.01).05) ciopts(lwidth(0.45 1.1) lcolor(black black)) vert xlabel(.578 "Anbar" .671 "Babylon" .753 "Baghdad" .833 "Basrah" .915 "Diyala" 1.0 "Kerbala" 1.086 "Ninewa" 1.166 "Qadissiya" 1.245 "Salah al-Din" 1.33 "Tameem" 1.425 "Thi-Qar", angle(90)) legend(off) ytitle("Insurgent-Initiated SIGACTs/100k Pop.", size(medsmall)) yline(0, lcolor(cranberry%50) lpatter(- -)) yline(0.05, lcolor(gs10) lpatter(...))



************************************************** DROPPING INFLUENTIAL DISTRICTS *********************************************************************

* Al-Muqdadiya: 2006m11, 2007m4, 2007m6, 2007m8
* Al-Mahawil: 2007m7, 2007m9, 2007m10
* Balad: 2007m3, 2007m4

foreach x of var muqdadiya562 muqdadiya567 muqdadiya569 muqdadiya571 balad566 balad567 mahawil570 mahawil572 mahawil573 {
eststo `x': qui reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & `x'!=1, cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
}

coefplot(muqdadiya562, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (muqdadiya567, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (muqdadiya569, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (muqdadiya571, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (balad566, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (balad567, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (mahawil570, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (mahawil572, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)) (mahawil573, msymbol(O) msize(medium) mlcolor(black) mfcolor(black)), keep(D.pc_spent_detain) ci(95 90) symbol(O) lcolor(black) fcolor(black) ylabel(-.45(.05).05) ymtick(-.45(.01).05) ciopts(lwidth(0.45 1.1) lcolor(black black)) vert xlabel(.6 `" "Al-Muqdadiya""Nov. 2006" "' .7 `" "Al-Muqdadiya""Apr. 2007" "' .8 `" "Al-Muqdadiya""June 2007" "' .9 `" "Al-Muqdadiya""Aug. 2007" "' 1 `" "Al-Mahawil""July 2007" "' 1.1 `" "Al-Mahawil""Sept. 2007" "' 1.2 `" "Al-Mahawil""Oct. 2007" "' 1.3 `" "Balad""Mar. 2007" "' 1.4 `" "Balad""Apr. 2007" "', angle(90)) legend(off) ytitle("Insurgent-Initiated SIGACTs/100k Pop.", size(medsmall)) yline(0, lcolor(cranberry%50) lpatter(- -)) yline(0.05, lcolor(gs10) lpatter(...))



************************************** FOCUSING ON INDIVIDUAL PROVINCES *********************************************************************

eststo clear

global continuous2 "l.pc_wits_insurgent l.pc_ibc_coalition l.pc_spent_cap l.pc_spent_cerp_small_nondetain pcturban urate"

eststo anbar: reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & governorate=="Anbar", cluster(distid) absorb(distid moyr##c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/province.tex", tex(land) label dec(3) replace ctitle(Anbar) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

eststo babylon: reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & governorate=="Babylon", cluster(distid) absorb(distid moyr##c.sunni_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/province.tex", tex(land) label dec(3) append ctitle(Babylon) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

eststo baghdad: reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & governorate=="Baghdad", cluster(distid) absorb(distid moyr##c.sunni_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/province.tex", tex(land) label dec(3) append ctitle(Baghdad) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

eststo basrah: reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & governorate=="Basrah", cluster(distid) absorb(distid moyr##c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/province.tex", tex(land) label dec(3) append ctitle(Basrah) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

eststo diyala: reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & governorate=="Diyala", cluster(distid) absorb(distid moyr govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/province.tex", tex(land) label dec(3) append ctitle(Diyala) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

eststo kerbala: reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & governorate=="Kerbala", cluster(distid) absorb(distid moyr##c.sunni_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/province.tex", tex(land) label dec(3) append ctitle(Kerbala) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

eststo ninewa: reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous2 l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & governorate=="Ninewa", cluster(distid) absorb(distid moyr govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/province.tex", tex(land) label dec(3) append ctitle(Ninewa) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

eststo qadissiya: reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & governorate=="Qadissiya", cluster(distid) absorb(distid moyr##c.sunni_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/province.tex", tex(land) label dec(3) append ctitle(Qadissiya) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

eststo salahaldin: reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous2 l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & governorate=="Salah al-Din", cluster(distid) absorb(distid moyr##c.sunni_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/province.tex", tex(land) label dec(3) append ctitle(Salah al-Din) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

eststo tameem: reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous2 l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & governorate=="Tameem", cluster(distid) absorb(distid moyr govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/province.tex", tex(land) label dec(3) append ctitle(Tameem) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')

eststo thiqar: reghdfe d.pc_instot_sigact D.(pc_spent_detain $continuous2 l.pc_instot_sigact l.splag_pc_instot_sigact l.clearance_rate2) $binary [aw=population2003] if year>=2004 & obsdrop==0 & britishzone==0 & governorate=="Thi-Qar", cluster(distid) absorb(distid moyr##c.sunni_voteshare moyr#c.shia_voteshare govid#dcgdo) keepsingleton
estat ic
mat es_ic = r(S)
local AIC: display %4.1f es_ic[1,5]
outreg2 using "/Users/christopherblair/Desktop/province.tex", tex(land) label dec(3) append ctitle(Thi-Qar) keep(D.pc_spent_detain) alpha(0.01, 0.05, 0.1) addstat(AIC, `AIC')


************************************** CONSTRUCTION TIMELINES *********************************************************************

use "~/Dropbox/Projects/Detainee Operations/Data/detain_projects.dta", clear
estimates drop _all
eststo clear

gen viol=pc_instot_sigact1
eststo: reghdfe diffstart viol, cluster(alt_distid) abs(alt_distid moyr1)
drop viol

gen viol=ins_6ma1
eststo: reghdfe diffstart viol, cluster(alt_distid) abs(alt_distid moyr1)
drop viol

gen viol=pc_instot_sigact2
eststo: reghdfe diffend viol, cluster(alt_distid) abs(alt_distid moyr2)
drop viol

gen viol=ins_6ma2
eststo: reghdfe diffend viol, cluster(alt_distid) abs(alt_distid moyr2)
drop viol

coefplot(est1, msymbol(O) msize(medlarge) mlcolor(black) mfcolor(black)) (est2, msymbol(O) msize(medlarge) mlcolor(black) mfcolor(black)) (est3, msymbol(S) msize(medlarge) mlcolor(black) mfcolor(white)) (est4, msymbol(S) msize(medlarge) mlcolor(black) mfcolor(white)), keep(viol) ci(95 90) symbol(O) lcolor(black) fcolor(black) xlabel(-1(.5)2) ciopts(lwidth(0.45 1.1) lcolor(black black)) ylabel(.7 "Lagged Violence" .9 "Violence Trend (6 Month MA)" 1.1 "Lagged Violence" 1.3 "Violence Trend (6 Month MA)") legend(off) yline(0, lcolor(cranberry%50) lpatter(- -)) xline(0, lcolor(cranberry%50) lpatt(shortdash)) xtitle("Effect of Violence on Implementation Timelines")

